﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using ScrumLite.Services;
using ScrumLite.Services.Contracts;
using System.Collections.ObjectModel;

namespace ScrumLite.Gateways
{
    public class RequestsServiceClient : ClientBase<IRequestsService>, IRequestsService
    {

        #region IRequestsService Members

        public Request[] GetCommittedRequests(string projectId)
        {
            return base.Channel.GetCommittedRequests(projectId);
        }

        public void SaveRequests(string projectId, Request[] requests)
        {
            base.Channel.SaveRequests(projectId, requests);
        }

        public void SetPriorities(Guid[] requestIds)
        {
            base.Channel.SetPriorities(requestIds);
        }

        public int AddRequest(string projectId, Request request)
        {
            return base.Channel.AddRequest(projectId, request);
        }

        public void DeleteRequest(Guid requestId)
        {
            base.Channel.DeleteRequest(requestId);
        }

        public void UpdateRequest(string projectId, Request request)
        {
            base.Channel.UpdateRequest(projectId, request);
        }

        public Dictionary<string, string> GetStatusList()
        {
            return base.Channel.GetStatusList();
        }

        public Request GetRequest(string projectId, int moniker)
        {
            return base.Channel.GetRequest(projectId, moniker);
        }

        public Collection<Request> GetRequests(string projectId, string workArea)
        {
            return base.Channel.GetRequests(projectId, workArea);
        }

        public Request[] GetOpenedRequests(string projectId)
        {
            return base.Channel.GetOpenedRequests(projectId);
        }

        public void AssignWorkAreas(string projectId, int moniker, string[] workAreaIds)
        {
            base.Channel.AssignWorkAreas(projectId, moniker, workAreaIds);
        }

        public Dictionary<int, int> GetWeeklyWeight(string projectId)
        {
            return base.Channel.GetWeeklyWeight(projectId);
        }

        public Dictionary<WorkArea, Dictionary<RequestStatus, int>> GetRequestsByStatusByWorkArea(string projectId)
        {
            return base.Channel.GetRequestsByStatusByWorkArea(projectId);
        }

        public Dictionary<RequestStatus, int> GetRequestsByStatus(string projectId)
        {
            return base.Channel.GetRequestsByStatus(projectId);
        }

        public WorkAreaWeight[] GetWorkAreasGroupByWeight(string projectId)
        {
            return base.Channel.GetWorkAreasGroupByWeight(projectId);
        }

        public WorkArea GetWorkArea(string projectId, Guid id)
        {
            return base.Channel.GetWorkArea(projectId, id);
        }

        public void SaveWorkArea(WorkArea wa, Guid projectId)
        {
            base.Channel.SaveWorkArea(wa, projectId);
        }

        public WorkArea[] GetWorkAreas(string projectId)
        {
            return base.Channel.GetWorkAreas(projectId);
        }

        public WorkArea[] GetWorkAreasByMoniker(string projectId, int moniker)
        {
            return base.Channel.GetWorkAreasByMoniker(projectId, moniker);
        }

        public void CleanCommitted(string projectId, RequestStatus[] statusToUpdateCommitted)
        {
            base.Channel.CleanCommitted(projectId, statusToUpdateCommitted);
        }

        public int GetRequestsTotalWeight(string projectId)
        {
            return base.Channel.GetRequestsTotalWeight(projectId);
        }

        public Dictionary<DayOfWeek, int> GetCommittedDailyWeight(string projectId)
        {
            return base.Channel.GetCommittedDailyWeight(projectId);
        }

        public int GetCommittedRequestsTotalWeight(string projectId)
        {
            return base.Channel.GetCommittedRequestsTotalWeight(projectId);
        }

        #endregion
    }
}
